package com.haizhi.crm.api.controller.sys.auth;

import com.haizhi.crm.common.model.Response;
import com.haizhi.crm.sys.auth.model.InstitutionQo;
import com.haizhi.crm.sys.auth.service.InstitutionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * Created by yangyijun on 2018/5/17.
 */
@Api(description = "[系统-机构]" )
@RestController
@RequestMapping("/auth/institution" )
public class InstitutionController {

    @Autowired
    private InstitutionService institutionService;

    @PostMapping("/import" )
    @ApiOperation(value = "行内机构信息表数据导入接口" )
    public Response save(@RequestBody @Valid InstitutionQo institutionQo) {
        return institutionService.save(institutionQo);
    }

}
